public class AddTask implements Runnable {
	Account account;

	public AddTask(Account account) {
		super();
		this.account = account;
	}

	@Override
	public void run() {
		synchronized (Account.class) {
			for (int i = 0; i < 100; i++) {
				int balance = account.getBalance();
				account.setBalance(balance + 100);
			}

			int balance = account.getBalance();
			
			System.out.println(balance + Thread.currentThread().getName());
		}
		
	}

}
